<% if user_signed_in? %>
<%= form_for toggle_follow_action(activity_object),
             :html => { :class => "follow_form-#{ dom_id activity_object }" },
             :remote => true do |f| %>
  <% if f.object.new_record? %>
    <%= f.hidden_field :activity_object_id %>
  <% end %>
  <%= f.hidden_field :follow %>

  <%= f.submit t("#{ activity_object.object_type.underscore }.activity_action.#{ f.object.follow ? 'follow' : 'unfollow' }", class: "btn", :default => "activity_action.#{ f.object.follow ? 'follow' : 'unfollow' }") %>
<% end %>
<% end %>
